package com.lh.api.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lh.api.form.AddressForm;
import com.lh.api.form.DefaultAddressForm;
import com.lh.api.vo.UserAddrVo;
import com.lh.common.entity.admin.UserAddress;

import java.util.List;

/**
 * 用户
 *
 * @author Mark sunlightcs@gmail.com
 */
public interface UserAddressService extends IService<UserAddress> {
    /**
    　* @description: 添加地址
    　* @author GaoZien
    　* @date 2020/5/13 0013
    */
    UserAddress addObj(AddressForm addressForm, Long userId);
    /**
    　* @description: 更新地址
    　* @author GaoZien
    　* @date 2020/5/13 0013
    */
    int updateObj(AddressForm addressForm);
    /**
     　* @description: 获取当前用户的地址列表
     　* @author GaoZien
     　* @date 2020/5/13 0013
     */
    List<UserAddrVo> selectByUserId(Long userId);
    /**
     　* @description: 设置默认地址
     　* @author GaoZien
     　* @date 2020/5/13 0013
     */
    void setDefault(DefaultAddressForm defaultAddressForm, Long userId);

    void delAddress(Long userId, Long uaid);
}
